1. Field of the Invention
The present invention relates to automatic creation of a program. More particularly, the present invention relates to a system and method for automatically creating a program such as a software component and a client program using this component.
2. Description of the Related Art
ActiveX pronounced by Microsoft Corporation makes it easy to achieve a distributed computer system and division of software into components, under a Windows-based network environment. In conjunction with it, the automatic creation of a component has been recently tried.
As this type of a conventional technique, there is COMTI available from Microsoft Corporation, which creates an ActiveX component to access to a mainframe. However, although COMTI can create the component for accessing to the mainframe, COMTI cannot create a client program using the created component. For this reason, a program developer needs to develop the client program separately and manually on the basis of the opened or released data of the created components.
As another conventional example of a technique for automatically creating a component, a system and method for creating an object oriented database operation program is disclosed in Japanese Laid Open Patent Application (JP-A-Heisei 11-224184). In this reference, a schema data defined in an object oriented database is acquired, a program for an automation server (code component) is automatically created for an automation communication based on the acquired schema data and a program template file, and a client program serving as an external application is automatically created using a schema class of a database opened by this automation server, and its attribute and its method at the same time.
If the client program using the created components is separated from the creation of the components and separately and manually developed, this imposes a large burden on the developer of the client program, such as the increase in the number of work steps. Also, the development of the client program is decelerated in the worst case.
Problems in the conventional technique will be described by taking as an example, the creation of software components having a function of accessing to a transaction process program running on a mainframe and a client program using the same.
As shown in FIG. 1A, the access to a transaction process program 301 running on a mainframe (for example, ACOS2/4/6 available from NEC) 300 has been conventionally executed from a private online terminal 302 such as ETOS52G. FIG. 1B shows an example of an operational procedure from the private online terminal 302 to the transaction process program 301. In this example, a message is sent to the transaction process program 301 on the mainframe 300 from the private online terminal 302 in an order of a message “M1”, a message “M2” and a message “M3”. Accordingly, the transaction process program 301 executes a series of sequences. In the messages “M1” to “M3”, several parameters “PR1” to “PR3” are specified as necessary. The individual parameter has any one of an input parameter, an output parameter, an input/output parameter and no operation. Its state is dynamically changed on the basis of a message ID among the messages “M1” to “M3”.
If the access function to the transaction process program on such a mainframe is enabled from a Windows-based general personal computer other than the private online terminal, a software component 303 is created in which methods “MT1” to “MT3” respectively corresponding to the messages “M1” to “M3” are installed as shown in FIG. 1C, and also a client program 304 is created using the same. In the conventional technique, the software component 303 is automatically created from various definition data necessary to create the software component. The client program 304 is created separately and manually by a developer of the client program based on the opened or released data of the created software component.
In this case, as a problem, the order of starting the methods “MT1” to “MT3” is not known even if the opened or released data of the created software component 303 is viewed. Thus, it is not easy for the developer of the client program 304 to prepare the description of the order of calling the methods “MT1” to “MT3”. In order to understand the order of starting the methods “MT1” to “MT3”, it is necessary to know that the method “MT1” corresponds to the message “M1”, the method “MT2” corresponds to the message “M2”, and the method “MT3” corresponds to the message “M3”, respectively, and that the transmission of the messages in the order of the messages “M1” to “M3” is required in the specification of the transaction process program 301 on the mainframe 300. For these purposes, both of knowledge with regard to the component and knowledge with regard to a transaction process in a mainframe are required. Usually, the developer of the client program, although having the knowledge of the component, does not have the knowledge of the mainframe.
As another problem, although data about the type of each of the parameters of the methods “MT1” to “MT3” can be known from their opened or released data, the state of the individual parameter is unknown among the states of the input parameter, the output parameter, the input/output parameter and the no operation. Thus, it is not easy for the developer of the client program 304 to prepare the description of a process for setting a value for a parameter required before and after calling the methods “MT1” to “MT3” in the client program 304, and a process for acquiring the value from the parameter. For example, if the parameter “PR1” is the input parameter, it is necessary to describe the process for setting the value to the parameter “PR1” before calling the method “MT1”. In a case of the output parameter, it is necessary to describe the process for acquiring the value of the parameter “PR1” after calling the method “MT1”. In a case of the input/output parameter, it is necessary to describe the process for setting the value to the parameter “PR1” before calling the method “MT1”, and it is also necessary to describe the process for acquiring the value of the parameter “PR1” after calling. In order to understand the type of such a parameter, it is necessary to have the knowledge with regard to the treatment of the parameters in the transaction process in the mainframe 300, in addition to the knowledge with regard to the component, similarly to the case of understanding the order of actuating the methods “MT1” to “MT3”.
The developer of the client program 304 may inquire of a technician for the mainframe 300 about the definition of the order of starting the methods “MT1” to “MT3” and about the types of the respective parameters. However, because of the completion of the development of the software component, there may be a case that the technician for the mainframe 300 having relation to the development of the software component does not exist at that time, and the inquiry is impossible. Even in the case of the existence of the technician, the inquiry itself is trouble for both the developer and the technician. Moreover, when the developer inquires of another mainframe technician about them, the technician having no relation to the development of the software component does not understand the component, even if knowing which parameter is responsible for the input or the output, or even if knowing the order of sending out the messages. Thus, it is difficult to carry out the explanation so that the developer of the client program can understand.
On the other hand, Japanese Laid Open Patent Application (JP-A-Heisei 11-224184) discloses a technique for automatically creating a client program serving as an external application using a schema class of a database published by an automation server, which is automatically created, and its attribute and its method. However, the client program disclosed therein is the interface to access to the database. This is originally data corresponding to a C++ class at a stage of the development of an object oriented database, and it does not require to a client side the concepts of an calling order (sequence), an input, an output and an input/output. Thus, the technique disclosed therein cannot solve the above-mentioned problems of the conventional technique.
In conjunction with the above description, a code generating apparatus in an application field of a distributed object system is disclosed in Japanese Laid Open Patent application (JP-A-Heisei 10-111802). This reference is related to a method which is implemented in a computer which is on a network and automatically assembles an object independent on language to generate a network application used for a distributed object system. The method is composed of a step of receiving schematic representation of the network application, and the schema representation defines a plurality of links among distributed object representations. The method is further composed of a step of loading the schematic representation of the network application in a symbol table, and storing a portion of the schematic representation in the symbol table as a plurality of entries. The method is further composed of a step of determining a least one program source file which should be generated and at least one corresponding program template which should be used, and the program template contains references to the plurality of entries in the symbol table. The method is further composed of a step of combining the plurality of entries in the symbol table with at least one corresponding program template, which are compiled thereby, and generating at least one program source file suitable for the portion of the network application.